package com.wc.meiju;


import java.util.Locale;

/**
 * @ClassName:Role
 * @Author: 鹿建文
 * @Date: 2022/3/23  - 11:22
 * @Describe:
 */
public enum Role {
    /**
     * 管理员
     */
    ADMIN,
    /**
     * VIP用户
     */
    VIP,
    /**
     * 普通彷
     */
    COMMON;
    public static Role getRoleByName(String role){
        role = role.toLowerCase(Locale.ROOT);

        switch (role){
            case "admin":
                return Role.ADMIN;
            case "comm":
                return Role.COMMON;
            case "vip":
                return Role.VIP;
            default:
                return null;
        }


    }
}
